package com.example.bookcar.mapper;

import com.example.bookcar.entity.CarType;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
* @author 18225
* @description 针对表【t_car_type】的数据库操作Mapper
* @createDate 2023-03-06 14:54:23
* @Entity com.example.bookcar.pojo.CarType
*/
@Mapper
public interface CarTypeMapper {


    //分页查询
    Page<CarType> listCarTypes(String name);

    //根据id查询车辆类型信息
    @Select("select * from t_car_type where id = #{id}")
    CarType getCarTypeById(Integer id);

    //修改车辆类型信息
    int updateCarType(CarType carType);

    //删除车辆类型信息
    @Delete("delete from t_car_type where id = #{id}")
    int deleteCarTypeById(Integer id);

    //添加车辆类型信息
    int insertCarType(CarType carType);
}
